<ion-view view-title="授信收款" class="creditrepayview">
	<ion-nav-bar ng-class="baseclass">
		<ion-nav-back-button></ion-nav-back-button>
	</ion-nav-bar>
	
	<div class="bar bar-subheader padding-0">
		<div class="row top">
			<div class="col" on-tap="activeSlide(0)">
				<div ng-class="selectIndex==0?'top-activated':''">收款明细</div>
			</div>
			<div class="col" on-tap="activeSlide(1)">
				<div ng-class="selectIndex==1?'top-activated':''">欠款明细</div>
			</div>
		</div>
	</div>
	

	<!--描述：滑动块-->
	<ion-content class="has-header has-subheader bg">

		<ion-slide-box delegate-handle="tab-handle" on-touch="onTouch()" on-release="onRelease()" draw-slide="false" on-slide-changed="slideChanged(index)" active-slide="slideIndex" show-pager="false">

			<!--收款明细 -->
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj">
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					
					<!--没有数据firstHide-->
					<div class="noData" ng-if="!datasArr[0].credit">
						<img src="./img/guilin/other/noorder@2x.png" />
						<div class="tip">没有欠款明细哦！</div>
					</div>
					
					<ul class="list">
						<div class="mb10" ng-repeat="repay in datasArr[0].credit">
							<li class="item item-borderless">
								<p class="order">{{repay.time}}</p>
								<span class="repayType">{{repay.type_name}}</span>
								<div class="money" ng-class="{'topLess':repay.type==1}"><span class="fh">￥</span>{{repay.repayment | currency:''}}</div>
								<!--还款方式是type=1线下支付的时候，显示凭证-->
								<div class="look" ng-if="repay.type==1" on-tap="openModal_voucher($index)">查看凭证</div>
							</li>
							<li class="item btnItem" ng-if="repay.status==0">
								<div class="basebtn gray" on-tap="confrim(repay.member_id,repay.repay_id,repay.repayment,1)">作废</div>
								<div class="basebtn blue" on-tap="confrim(repay.member_id,repay.repay_id,repay.repayment,0)">确认收款</div>
							</li>
						</div>
					</ul>
					
					<ion-infinite-scroll ng-if="!isLoad&&datasArr[0].page.tPage>datasArr[0].page.cPage" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>
			
			
			<!--欠款明细-->
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj">
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					
					<!--没有数据firstHide-->
					<div class="noData" ng-if="!datasArr[1].credit">
						<img src="./img/guilin/other/noorder@2x.png" />
						<div class="tip">没有待确认的还款！</div>
					</div>
					
					<ul class="list">
						<li class="item item-borderless mb10"  ng-repeat="repay in datasArr[1].credit">
							<p class="order">订单号：{{repay.order_id}}</p>
							<p class="time">{{repay.time}}</p>
							<div class="money"><span class="fh">￥</span>{{repay.repayment | currency:''}}</div>
						</li>
					</ul>
					
					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad&&datasArr[1].page.tPage>datasArr[1].page.cPage" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>
			
		</ion-slide-box>
	</ion-content>
</ion-view>